<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>添加产品线商品</title>
<script type="text/javascript" src="../boot.js"></script>
<script>
var tbgrid;
function parsePage(){
	
$('#toolbar').toolbar({
	items:[{
		text:'开始',
		iconCls:'icon-start'
	},'-',{
		text:'删除',
		iconCls:'icon-del'
	}]
});



$('select').combobox({
	prompt:'请选择...',
data:[{value:'0',text:'下拉框'}],
	valueField:'value',
	textField:'text'
});

tbgrid = $('#tbList').datagrid({
				data:{"total":1,"rows":[{'id':'1','col1':'满300元送50元现金券','col2':'...','col3':'2011-8-4 12:00:00 - 2011-8-5 12:00:00','col4':'admin','col5':0}]},
				singleSelect:true,
		    columns:[[
					{
					title:'活动名称',
					field:'col1',
					width:100
					},{
					title:'优惠内容',
					field:'col2',
					width:100
					},{
					title:'活动时间',
					field:'col3',
					width:150
					},{
					title:'添加人',
					field:'col4',
					width:60
					},{
					title:'状态',
					field:'col5',
					width:60,
					formatter:function(value,rec,index){
						var str="待审核";
						switch(value){
							case 1:
							str="正在进行";
							break;
							case 2:
							str="已终止";
							break;
						}
						return str;
					}
					},
					{
				title : '操作',
				field:'opt',
				width:60,
				formatter:function(value,rec,index){
						var str='<a href="javascript:;" class="jsAttr">活动跟踪</a> | <a href="javascript:;" class="jsStart">开始</a> | <a href="javascript:;" class="jsDel">删除</a>';
						return str;
					}
			}
		]],
		onLoadSuccess:function(){		
			$('.jsView').click(function(){
				parent.addBlankTab({
					title:'查看会员',
					href:'member/member-detail.html',
					refreshed:true
				});
				return false;
			});
		}

	});

}


function del(id){
	if(id.length<=0){
		showError('请选择需要删除的项目！');
		return;
	}
	showConfirm('确认删除吗？',function(){
		showSuc('删除成功！'+id);
		tbgrid('deleteRow',0);
		tbgrid('reload');
	});
}


function add(){
	parent.addBlankTab({
		title:'添加产品线',
		href:'goods/commdity-line-add.html'
		});
}
</script>
</head>

<body class="easyui-layout">
<div data-options="region:'north',border:false" class="toolbar-region">
    <div id="toolbar">
    </div>
</div>
<div  data-options="region:'center',border:false">
    <!--subLayout start-->
    <div class="easyui-layout" data-options="fit:true" id="subLayout">
        <!--搜索start-->
        <div data-options="region:'north',border:false" >
            <div class="search-div">
                <form name="searchForm" id="searchForm" action="" method="post" >
                    <table class="search-tb" >
                        <col width="80" />
                        <col/>
                        <col width="80" />
                        <col/>
                        <col width="80" />
                        <col/>
                        <tbody>
                            <tr>
                                <th>添加人：</th>
                                <td><input type="text" class="ipt" /></td>
                                <th>活动状态：</th>
                                <td><select>
                                    </select></td>
                                <th>活动时间：</th>
                                <td ><input class="ipt easyui-datebox" data-options="dateFmt:'yyyy-mm-dd HH:mm:ss'" style="width:140px;" /> - <input class="ipt easyui-datebox" data-options="dateFmt:'yyyy-mm-dd HH:mm:ss'" style="width:140px;" /> <a class="easyui-linkbutton ml10" id="SearchBtn">搜索</a></td>
                            </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
        <!--搜索end--> 
        <!--列表-->
        <div data-options="region:'center',border:false">
            <table id="tbList">
            </table>
        </div>
    </div>
    <!--subLayout end-->
</div>
</body>
</html>
